package com.yuner.search.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

/**
 * @author Seven-Liu
 * @date 2022-07-04
 */
// 做文档关联（索引名称，分片数量，副本数量 ）
@Document(indexName = "phone", shards = 3, createIndex = true, replicas = 1)
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Phone {
    @Id
    private Long id;
    private String phoneName;
    private String color;
    private Double price;
}
